﻿<%@ Page Title="" Language="C#" MasterPageFile="~/OneColumn.Master" AutoEventWireup="true"
    CodeBehind="ChangePassword.aspx.cs" Inherits="KCL.Management.ChangePassword" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageHeader" runat="server">
    <style type="text/css">
        #changePassword td:first-child
        {
            padding-right: 10px;
            text-align: right;
        }
        #changePassword td:first-child + td
        {
            width: 200px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <table id="changePassword">
            <tr>
                <td colspan="2" style="text-align: left; font-size: 15pt;">
                    <asp:Label ID="isChangedSuccessfuly" runat="server" Text="Đã đổi password thành công!"
                        Visible="false"></asp:Label>
                </td>
            </tr>
            <%--<tr>
                <td>
                    <span>Password cũ:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtOldPassword" runat="server" Width="200"></asp:TextBox>
                </td>
            </tr>--%>
            <tr>
                <td>
                    <span>Password mới:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtNewPassword" runat="server" Width="200" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span>Nhập lại password mới</span>
                </td>
                <td>
                    <asp:TextBox ID="txtConfirmedNewPassword" runat="server" Width="200" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:left">
                    <asp:CompareValidator ID="isPasswordMatched" runat="server" ErrorMessage="Password mới nhập không đúng!"
                        ControlToValidate="txtConfirmedNewPassword" ControlToCompare="txtNewPassword"></asp:CompareValidator><br />
                    <asp:RegularExpressionValidator ID="checkPasswordLength" runat="server" ErrorMessage="Password phải có ít nhất 5 ký tự" ValidationExpression="^[a-zA-Z0-9'@&#.\s]{5,100}$" ControlToValidate="txtNewPassword"></asp:RegularExpressionValidator>
                </td>                
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Button ID="btnChangePassword" runat="server" Text="Đổi password" 
                        onclick="btnChangePassword_Click" />                    
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
